import { storeBindingsBehavior } from "mobx-miniprogram-bindings";
import member from '@src/store/member';
import base from '@src/store/base';
import color from "@src/common/color";
import router from "@src/router";

Component({
  options: {
    addGlobalClass: true
  },
  behaviors: [storeBindingsBehavior, router.routerBehavior],
  storeBindings: [{
    store: member,
    fields: ['isMember', 'categoryName'],
    actions: ['getBaseInfo'],
  }, {
    store: base,
    fields: ['themeColor', 'themeTitleColor']
  }],
  properties: {
    activityList: Array,
    rechargeAwardList: Array,
  },
  observers: {
    'themeColor': function (themeColor) {
      if (themeColor) {
        this.setData({ themeColorOpacity: color.HexToRGB(themeColor, 5) });
      }
    }
  },
  methods: {
  }
})
